Translation:

5. It is He Who made the sun to be a shining glory and the moon to be a light (of beauty) and measured out stages for her: that ye might know the number of years and the count (of time). Nowise did Allah create this but in truth and righteousness. (Thus) doth He explain his Signs in detail for those who understand.

Notes (Tafseer)

1391. The fitting epithet for the sun is dhiaa, "splendour and glory of brightness", and for the moon is "a light" (of beauty), the cool light that illuminates and helps in the darkness of the night. But the sun and moon also measure time. The simplest observation can keep pace with the true lunar months and lunar years, which are all that is required by a pastoral people. For agriculture solar years are required, as they indicate the changes of the seasons, but ordinary solar years are never exact; even the solar year of 365 1/4 days requires correction by advanced astronomical calculation.

1392. Everything in Allah's creation has use and purpose, and fits into a Design. It is true in every sense of the word and it is good and just. It is not merely a matter of sport or freak (xxi. 16). Though so varied, it proclaims Allah's Unity; though a limited free-will is granted to creatures, the results of evil (which is rebellion) are neutralised and harmony is restored. Cf. iii. 191.

1393. Cf. ix. I 1.